package com.xxl.job.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxl.job.admin.core.model.XxlJobUser;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author xuxueli 2019-05-04 16:44:59
 */
@Mapper
public interface XxlJobUserDao extends BaseMapper<XxlJobUser> {

    List<XxlJobUser> pageList(@Param("offset") int offset,
            @Param("pageSize") int pageSize,
            @Param("username") String username,
            @Param("role") int role);

    int pageListCount(@Param("offset") int offset,
            @Param("pageSize") int pageSize,
            @Param("username") String username,
            @Param("role") int role);

    XxlJobUser loadByUserName(@Param("username") String username);

    int save(XxlJobUser xxlJobUser);

    int update(XxlJobUser xxlJobUser);

    int delete(@Param("id") int id);

}
